package sis.testio.piped;/*
 * @auther 顶风少年
 * @mail dfsn19970313@foxmail.com
 * @date 2019-07-29 07:54
 * @notify
 * @version 1.0
 */

import java.io.PipedWriter;

public class Producer extends Thread {
    //输出流
    private PipedWriter writer = new PipedWriter();

    public Producer(PipedWriter writer) {
        this.writer = writer;
    }

    @Override
    public void run() {
        try {
            writer.write("你好，我是输出流");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
